Integrand size = 11, antiderivative size = 36 \[ \int \frac {\csc (x)}{a+b \cot (x)} \, dx=-\frac {\text {arctanh}\left (\frac {(-b+a \cot (x)) \sin (x)}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3590, 212} \[ \int \frac {\csc (x)}{a+b \cot (x)} \, dx=-\frac {\text {arctanh}\left (\frac {\sin (x) (a \cot (x)-b)}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}} \]
[In]
[Out]
Rule 212
Rule 3590
Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {1}{a^2+b^2-x^2} \, dx,x,(-b+a \cot (x)) \sin (x)\right ) \\ & = -\frac {\text {arctanh}\left (\frac {(-b+a \cot (x)) \sin (x)}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}} \\ \end{align*}
Time = 0.04 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.06 \[ \int \frac {\csc (x)}{a+b \cot (x)} \, dx=\frac {2 \text {arctanh}\left (\frac {-a+b \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}} \]
[In]
[Out]
Time = 0.16 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.97
method | result | size |
default | \(-\frac {2 \,\operatorname {arctanh}\left (\frac {-2 b \tan \left (\frac {x}{2}\right )+2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}\) | \(35\) |
risch | \(-\frac {i \ln \left ({\mathrm e}^{i x}+\frac {i a +b}{\sqrt {-a^{2}-b^{2}}}\right )}{\sqrt {-a^{2}-b^{2}}}+\frac {i \ln \left ({\mathrm e}^{i x}-\frac {i a +b}{\sqrt {-a^{2}-b^{2}}}\right )}{\sqrt {-a^{2}-b^{2}}}\) | \(89\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 98 vs. \(2 (32) = 64\).
Time = 0.28 (sec) , antiderivative size = 98, normalized size of antiderivative = 2.72 \[ \int \frac {\csc (x)}{a+b \cot (x)} \, dx=\frac {\log \left (-\frac {2 \, a b \cos \left (x\right ) \sin \left (x\right ) - {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - 2 \, b^{2} + 2 \, \sqrt {a^{2} + b^{2}} {\left (a \cos \left (x\right ) - b \sin \left (x\right )\right )}}{2 \, a b \cos \left (x\right ) \sin \left (x\right ) - {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}}\right )}{2 \, \sqrt {a^{2} + b^{2}}} \]
[In]
[Out]
\[ \int \frac {\csc (x)}{a+b \cot (x)} \, dx=\int \frac {\csc {\left (x \right )}}{a + b \cot {\left (x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.69 \[ \int \frac {\csc (x)}{a+b \cot (x)} \, dx=-\frac {\log \left (\frac {a - \frac {b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \sqrt {a^{2} + b^{2}}}{a - \frac {b \sin \left (x\right )}{\cos \left (x\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}}} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.69 \[ \int \frac {\csc (x)}{a+b \cot (x)} \, dx=-\frac {\log \left (\frac {{\left | 2 \, b \tan \left (\frac {1}{2} \, x\right ) - 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b \tan \left (\frac {1}{2} \, x\right ) - 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}}} \]
[In]
[Out]
Time = 11.91 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.86 \[ \int \frac {\csc (x)}{a+b \cot (x)} \, dx=-\frac {2\,\mathrm {atanh}\left (\frac {a-b\,\mathrm {tan}\left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}} \]
[In]
[Out]